package router

import (
	"database-platform/handler"
	"github.com/gin-gonic/gin"
)

func Init(e *gin.Engine) *gin.RouterGroup {

	serverApi := e.Group("/api/v1/servers")

	serverApi.GET("", handler.ListServerHandler)
	serverApi.GET("/:id", handler.RetrieveServerHandler)
	serverApi.POST("", handler.InsertServerHandler)
	serverApi.PUT("/:id", handler.UpdateServerHandler)
	serverApi.DELETE("/:id", handler.DeleteServerHandler)

	return serverApi
}
